<include src="../templates/html-header.html" path=".."></include>
<body>
  <div v-cloak class="aui-page page-login page-login--right-vertical">
    <div class="login-wrapper">
      <!-- page-header -->
      <include src="../templates/page-header.html" path=".."></include>
      <!-- page-main -->
      <main class="aui-page-main">
        <include src="../templates/pages/forget.html" path=".." v2="-v2"></include>
      </main>
      <!-- page-footer -->
      <include src="../templates/page-footer.html" path=".."></include>
    </div>
  </div>
  <include src="../templates/html-scripts.html" path=".."></include>
  <script>
    (function () {
      var vm = window.vm = new Vue({
        el: '.aui-page',
        data: function () {
          return {
            step: 1,
            dataForm: {
              mobile: '',
              captcha: '',
              smsCaptcha: ''
            },
            dataRule: {
              mobile: [
                { required: true, message: '必填项不能为空', trigger: 'blur' }
              ],
              captcha: [
                { required: true, message: '必填项不能为空', trigger: 'blur' }
              ],
              smsCaptcha: [
                { required: true, message: '必填项不能为空', trigger: 'blur' }
              ]
            },
            dataForm2: {
              password: '',
              confirmPassword: ''
            },
            dataRule2: {
              password: [
                { required: true, message: '必填项不能为空', trigger: 'blur' }
              ],
              confirmPassword: [
                { required: true, message: '必填项不能为空', trigger: 'blur' }
              ]
            }
          }
        },
        beforeCreate () {
          vm = this;
        },
        methods: {
          dataFormSubmitHandle () {
            vm.$refs['dataForm'].validate(function (valid) {
              if (valid) {
                vm.$refs['dataForm'].clearValidate();
                vm.step++;
              }
            });
          },
          dataForm2SubmitHandle () {
            vm.$refs['dataForm2'].validate(function (valid) {
              if (valid) {
                window.location.href = './login-v2.html';
              }
            });
          }
        }
      });
    })();
  </script>
</body>
</html>
